<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateNodeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('node', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name',50);
            $table->string('method',10);
            $table->string('url',80);
            $table->tinyInteger('state')->unsigned()->default(0);
            //$table->timestamps();
            $table->integer('created_at')->unsigned();
            $table->integer('updated_at')->unsigned();
            $table->unique('name');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('node');
    }
}
